<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<table class="contentTable">
    <c:forEach var="i" begin="0" end="8">
        <c:if test="${i mod 3 == 0}">
            <tr>
        </c:if>
        <td class="contentCell">
            <b><a href="/book/${randomBooks[i].id}" class="titleLink">${randomBooks[i].title}</a></b>
            <br/>
            <b><spring:message code="portal.webapp.label.authors"/>:</b>
            <c:forEach var="author" items="${randomBooks[i].authors}">
                ${author.fullName} <br/>
            </c:forEach>
            <b><spring:message code="portal.webapp.label.category"/>:</b> ${randomBooks[i].category.name}
            <br>
            <b><spring:message code="portal.webapp.label.comments"/>:</b> ${randomBooks[i].comments.size()}
        </td>
        <c:if test="${i mod 3 == 2}">
            </tr>
        </c:if>
    </c:forEach>
</table>